package com.shirojwt.com.lang;

import org.apache.shiro.crypto.hash.Hash;
import org.springframework.stereotype.Component;

import java.util.HashMap;

/**
 * @author chenguo
 * @date 2021/10/12 3:43 下午
 */
@Component
public class JwtResultMap extends HashMap<String, Object> {
    public JwtResultMap success(){
        this.put("result", "success");
        return this;
    }

    public JwtResultMap fail(){
        this.put("result", "fail");
        return this;
    }

    public JwtResultMap code(int code){
        this.put("code", code);
        return this;
    }

    public JwtResultMap message(Object message){
        this.put("message", message);
        return this;
    }
}
